The invention relates generally to computer systems, and deals more particularly with a technique to minimize data transfer between two computers or between a single computer and an external storage device.
It is well known today that one computer may serve as a host (or xe2x80x9cserverxe2x80x9d) and manage a large memory and nonvolatile storage for data and stored programs that another, client computer may need. The client computer may request such data or programs on its own initiative or the host may initiate the transfer itself. In some cases, the data and program to be transferred are very large and will xe2x80x9ctie-upxe2x80x9d the communication facility for an extended period of time. This may delay other important transfers or simply be very costly. In general, it is desirable to minimize the amount of data transfer.
Often the data is scattered throughout storage in the host computer (before transfer) and pointers are used to identify which blocks belong to the same data set. When such data needs to be transferred to a client computer, the data is first collected into a buffer and the pointers are replaced by offsets into the buffer. This simplifies the data transfer by permitting a bulk transfer. Nevertheless, this does not significantly reduce the total amount of data to be transferred.
Some computer systems today are xe2x80x9cobject orientedxe2x80x9d, i.e. each unit of data or stored program is encapsulated with respective management functions or xe2x80x9cobject methodsxe2x80x9d to manage or operate upon the data or stored program, and the combination is considered a discrete xe2x80x9cobjectxe2x80x9d.
Each object also belongs to a class with other objects. Each class also includes one or more object methods which can perform a function associated with any object in the class. Thus, all objects in the class share the object methods of the class. When called, an object can either invoke its own method (if one exists) to handle the request or use a shared class method to handle the request.
Also, an object typically references one or more other objects. For example, if an object contains shared data, then other objects which share this data reference this object. Also, a directory object may reference all file objects listed in the directory, and a text object may reference another object which indicates the length of the text object.
One type of request made to an object is to obtain a copy of the object. In response to such a copy request, a copy object method, either within the object itself or from the class, copies the object into a buffer and identifies the other objects which it references. Then, the copy method calls other copy methods within the referenced objects to copy the referenced objects into the buffer and replace the RAM pointers of the referencing object with offset(s) of the referenced object(s) in the buffer. This process is called xe2x80x9cflatteningxe2x80x9d the object set, and provides a more efficient package for transferring the object set across the communication facility. Nevertheless, if the object set is large, there is a substantial burden on the communication facility.
Accordingly, a general object of the present invention is to minimize the amount of data transfer in object oriented and nonobject oriented environments.
The invention resides in a host computer for providing an object stored in the host computer to a target computer. In response to a need for an object at the target computer, the host computer generates and transfers to the target computer a proxy program instead of the object. The proxy program, when executed at the target computer, provides the object. Usually, the proxy program is much shorter than the object itself, and this reduces message traffic.
According to one feature of the invention, the proxy program comprises a call to another program resident in the target computer to recreate the object.
According to another feature of the invention, the object also resides in the target computer, and the proxy program comprises a request to a function within the target computer to provide the object.
According to another feature of the invention, the host computer is programmed into an object oriented environment, the object references other objects, and the proxy program forms an agent in the target computer which requests these other objects from the host computer as needed by the target computer.
According to another feature of the invention, the host computer comprises a template for the proxy program and, in response to the need, enters data into the template to form the proxy program.
According to another feature of the present invention, the object stored in the host computer is in a form which is incompatible with target computer, and the proxy program converts the object to a form usable by the target computer.